<template>
    <div style="background: #fff;">
        <form-create :rule="rule" v-model:api="fApi" :option="options"/>
    </div>
</template>
    
    <script lang="ts" setup>
      import {ref, unref,reactive } from 'vue';
      
     const  fApi= ref({});
     const  options=reactive({
        onSubmit: (formData) => {
          alert(JSON.stringify(formData))
        },
        resetBtn: true
      })
      const rule=ref([
  {
    "type": "input",
    "field": "Fbe761ha7phhv",
    "title": "姓名",
    "value":"测试1",
    "info": "",
    "_fc_drag_tag": "input",
    "hidden": false,
    "display": true
  },
  {
    "type": "input",
    "field": "F1zq61ha7qgm4",
    "title": "班级",
    "info": "",
    "_fc_drag_tag": "input",
    "hidden": false,
    "display": true
  },
  {
    "type": "input",
    "field": "Fkdr61ha7qq1x",
    "title": "年龄",
    "info": "",
    "_fc_drag_tag": "input",
    "hidden": false,
    "display": true
  },
  {
    "type": "radio",
    "field": "Fd6t1oesuclivl",
    "title": "单选框",
    "info": "",
    "effect": {
      "fetch": ""
    },
    "options": [
      {
        "value": "1",
        "label": "选项1"
      },
      {
        "value": "2",
        "label": "选项2"
      }
    ],
    "_fc_drag_tag": "radio",
    "hidden": false,
    "display": true
  },
  {
    "type": "datePicker",
    "field": "Fftf1oesui0h8y",
    "title": "日期选择器",
    "info": "",
    "_fc_drag_tag": "datePicker",
    "hidden": false,
    "display": true
  },
  {
    "type": "rate",
    "field": "F8vu1oesuknvw9",
    "title": "评分",
    "info": "",
    "_fc_drag_tag": "rate",
    "hidden": false,
    "display": true,
    "value": 0
  }
]);
      </script>
    
    <style scoped lang="less">
    </style>